/*    */ package com.zimbra.cs.service.admin;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.common.util.StringUtil;
/*    */ import com.zimbra.cs.account.accesscontrol.AdminRight;
/*    */ import com.zimbra.cs.util.BuildInfo;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import com.zimbra.soap.admin.message.GetVersionInfoResponse;
/*    */ import com.zimbra.soap.admin.type.VersionInfo;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class GetVersionInfo
/*    */   extends AdminDocumentHandler
/*    */ {
/*    */   public Element handle(Element request, Map<String, Object> context)
/*    */     throws ServiceException
/*    */   {
/* 37 */     ZimbraSoapContext lc = getZimbraSoapContext(context);
/*    */     
/* 39 */     VersionInfo versionInfo = new VersionInfo();
/* 40 */     String fullVersionInfo = BuildInfo.VERSION;
/* 41 */     if (!StringUtil.isNullOrEmpty(BuildInfo.TYPE)) {
/* 42 */       fullVersionInfo = fullVersionInfo + "." + BuildInfo.TYPE;
/* 43 */       versionInfo.setType(BuildInfo.TYPE);
/*    */     }
/* 45 */     versionInfo.setVersion(fullVersionInfo);
/* 46 */     versionInfo.setRelease(BuildInfo.RELEASE);
/* 47 */     versionInfo.setBuildDate(BuildInfo.DATE);
/* 48 */     versionInfo.setHost(BuildInfo.HOST);
/*    */     
/* 50 */     versionInfo.setMajorVersion(BuildInfo.MAJORVERSION);
/* 51 */     versionInfo.setMinorVersion(BuildInfo.MINORVERSION);
/* 52 */     versionInfo.setMicroVersion(BuildInfo.MICROVERSION);
/* 53 */     versionInfo.setPlatform(BuildInfo.PLATFORM);
/* 54 */     GetVersionInfoResponse resp = new GetVersionInfoResponse(versionInfo);
/* 55 */     return lc.jaxbToElement(resp);
/*    */   }
/*    */   
/*    */   public boolean needsAdminAuth(Map<String, Object> context)
/*    */   {
/* 60 */     return true;
/*    */   }
/*    */   
/*    */   public boolean needsAuth(Map<String, Object> context)
/*    */   {
/* 65 */     return false;
/*    */   }
/*    */   
/*    */   public void docRights(List<AdminRight> relatedRights, List<String> notes)
/*    */   {
/* 70 */     notes.add("Do not need any right, all admins are allowed.");
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/admin/GetVersionInfo.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */